Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose future stub on Pinecone connection #32

Merged
merged 3 commits into from
Oct 6, 2023

Conversation

russcam
Copy link
Contributor

@russcam russcam commented Oct 3, 2023

This commit exposes the future stub on Pinecone connection, allowing for non-blocking async calls

Problem

PineconeConnection does not currently expose a stub for making asynchronous calls to the service. Async calls are very common in high traffic services.

Solution

Exposed the generated VectorServiceGrpc.VectorServiceFutureStub on PineconeConnection. This returns com.google.common.util.concurrent.ListenableFuture<V> for each call, which allows chaining of asynchronous operations.

The PR also removes an unused public method, setBlockingStub; can add this back if client API compatibility dictates.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Infrastructure change (CI configs, etc)
  • Non-code change (docs, etc)
  • None of the above: (explain here)

Test Plan

Run sanityAsyncFuture test

@rohanshah18
Copy link
Contributor

@russcam Thanks for making the changes for async stub. I was successfully able to run the integration tests locally against your changes. I have left a comment for reverting the test file changes since I'm in plans of rewriting them. Once reverted, I'll approve your PR and we can merge the changes!!

This commit exposes the future stub on Pinecone connection, allowing for
non-blocking async calls
@russcam
Copy link
Contributor Author

russcam commented Oct 3, 2023

I've reverted the test changes @rohanshah18

Copy link
Contributor

@rohanshah18 rohanshah18 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks for reverting the test changes!

@rohanshah18 rohanshah18 merged commit 50f812d into pinecone-io:main Oct 6, 2023
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants